Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qxlsx/1.4.3: Add qt6 compatibility #11364

Closed
wants to merge 5 commits into from

Conversation

MartinDelille
Copy link
Contributor

Specify library name and version: qxlsx/1.4.3

This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the conan-center hook activated.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

cmake.configure()
return cmake

def build(self):
for patch in self.conan_data.get("patches", {}).get(self.version, []):
tools.patch(**patch)
tools.replace_in_file(os.path.join(self._source_subfolder, "QXlsx", "CMakeLists.txt"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be option, only if qt6 set the the required cxxstd? would be a fun surprise for qt5 consumers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here: 7984922.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry the commit had to be fixed here: 329ec4c

@@ -8,4 +8,4 @@ find_package(QXlsx REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} QXlsx::Core)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prince-chrismc How shall I handle the C++ version conditionnally here ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the test packge, it's prefect

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@MartinDelille
Copy link
Contributor Author

@SpaceIm Is the patch submitted upstream wrong ? QtExcel/QXlsx#223

@conan-center-bot

This comment has been minimized.

@paulharris
Copy link
Contributor

I like to build with C++20, and apparently there can be some issues mixing different C++ standards between libs (I forget the details). I think in the QT recipe, it uses validate() method to ensure the C++ is at least c++17, and then it is up the profile how far to push the standard.

Then cmake should use the C++xx standard requested by the profile/conan.

prince-chrismc
prince-chrismc previously approved these changes Jul 16, 2022
@conan-center-bot

This comment has been minimized.

@MartinDelille
Copy link
Contributor Author

MartinDelille commented Jul 21, 2022

@jgsogo Any idea why the package is not built here ?

@uilianries
Copy link
Member

@MartinDelille please, read the log exposed by the CI result on the comment above.

It says:

WARN: fontconfig/2.13.93: requirement freetype/2.12.1 overridden by qt/5.15.4 to freetype/2.11.1 

So it says two of your requirements want to the same package, but different versions. Conan does not solve this kind of conflict, because it may result in runtime error, if those versions are incompatible. More information: https://docs.conan.io/en/latest/versioning/introduction.html#version-and-configuration-conflicts

There are some ways to solve it:

  • Update the Qt package to use freetype/2.12.1. Need to open a new PR
  • Add freetype/2.12.1 to this recipe, so Conan will solve to that version.

The second option is bad, because qxlsx does not need freetype, which would create a fake dependency.

I suggest your opening a PR for Qt package and update their dependencies first, so your error will be fixed.

@uilianries
Copy link
Member

@MartinDelille good news, the PR #11853 has your fix! Just need to be merged. Thanks to @ericLemanissier

@uilianries
Copy link
Member

@MartinDelille Sorry, that PR is only related to Qt 6. You need Qt 5. So that PR does not work for you.

@MartinDelille
Copy link
Contributor Author

@uilianries Done here: #11857

@MartinDelille MartinDelille dismissed stale reviews from prince-chrismc and SSE4 via 1cd3798 July 22, 2022 09:16
@MartinDelille
Copy link
Contributor Author

@paulharris Is my latest patch submitted upstream addressing the issue you are raising ?

@conan-center-bot
Copy link
Collaborator

Failure in build 15 (1cd379890f417a7061fe29811e64bb31ad5cbd16):

  • qxlsx/1.4.3@:
    Error running command conan info qxlsx/1.4.3@#215c7ef40368a8751eaa5a749bda7a13 --json {jsonName} --dry-build -pr {profileName}:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.libcxx=libc++
    compiler.version=11.0
    os=Macos
    [options]
    qxlsx:shared=False
    
    ...
    WARN: libmysqlclient/8.0.25: requirement openssl/1.1.1q overridden by qt/5.15.4 to openssl/1.1.1o 
    ERROR: Conflict in cmake/3.22.5:
        'cmake/3.22.5' requires 'openssl/1.1.1q' while 'libmysqlclient/8.0.25' requires 'openssl/1.1.1o'.
        To fix this conflict you need to override the package 'openssl' in your root package.
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@paulharris
Copy link
Contributor

@paulharris Is my latest patch submitted upstream addressing the issue you are raising ?

I'll comment in there, it looks ok to me, but I wonder what the cmake experts would say about it.

@MartinDelille
Copy link
Contributor Author

but I wonder what the cmake experts would say about it.

cmake expert unfortunately I'm not <(-_-)>

@MartinDelille
Copy link
Contributor Author

I think we should wait for the next release of QXlsx because there is too much fix for Qt 6 since the last release:

[git log --oneline -- QXlsx/CMakeLists.txt]
38c1ec8 Define cpp standard only if not defined (QtExcel/QXlsx#226)
e53efc5 Use c++17 when using Qt 6
73ea291 Minor formatting fix
6d1667f Fix shared builds
1b0a279 CMake: Allow for OPTIONAL shared lib build (QtExcel/QXlsx#197)
5a086df Force strict building and fix QString usage
87afa71 set new cmake file for lib & console application

@MartinDelille
Copy link
Contributor Author

On its way: #12604

@MartinDelille MartinDelille deleted the qxlsx-qt6 branch December 3, 2022 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants